<template>
  <div class="imgList">
    <a
      v-for="(item, index) in lists"
      :key="index"
      :href="item.path"
      :style="{ width: aWidth + 'px', height: aHeight + 'px' }"
    >
      <img :src="item.imgPath" alt="没有网络" />
    </a>
  </div>
</template>
<script>
export default {
  name: "imgList",
  props: {
    list: [],
    height: Number,
    width: Number,
  },
  data() {
    return {
      lists: this.list,
      aWidth: this.width,
      aHeight: this.height,
    };
  },
};
</script>
<style scoped>
a {
  display: inline-block;
}
a img {
  width: 100%;
  height: 100%;
}
</style>